home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / lzw4p.exe / LZW4P.DOC < prev    next >
Text File  |  1993-02-28  |  34KB  |  1,008 lines

  1.  
  2.  
  3.                           LZW Data Compression Library
  4.  
  5.                                 For Turbo Pascal
  6.  
  7.  
  8.                                     (LZW4P)
  9.  
  10.  
  11.  
  12.                                  USERS MANUAL
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                                    Version 1.2
  19.  
  20.                                   March 1, 1993
  21.  
  22.  
  23.  
  24.  
  25.                         This software is provided as-is.
  26.                  There are no warranties, expressed or implied.
  27.  
  28.  
  29.  
  30.  
  31.                               Copyright (C) 1993
  32.                               All rights reserved
  33.  
  34.  
  35.  
  36.                               MarshallSoft Computing, Inc.
  37.                               Post Office Box 4543
  38.                               Huntsville AL 35815
  39.  
  40.                               205-881-4630  Voice / FAX
  41.                               205-880-9748  Support BBS
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.         LZW4P Users Manual                                     Page 1
  61.                               C O N T E N T S
  62.  
  63.  
  64.  
  65.  
  66.  
  67.          Chapter                                                   Page
  68.  
  69.          1.0 Introduction..............................................3
  70.              1.1 Distribution Files....................................3
  71.              1.2 Compiling the Library.................................4
  72.              1.3 User Support..........................................4
  73.              1.4 Installation..........................................5
  74.          2.0 The LZW Algorithm.........................................6
  75.              2.1 LZW Compression.......................................6
  76.              2.2 LZW Expansion.........................................7
  77.              2.3 LZW Implementation....................................7
  78.          3.0 Example Programs..........................................8
  79.              3.1 COMPRESS..............................................8
  80.              3.2 EXPAND................................................8
  81.              3.3 TEST_LZW..............................................9
  82.              3.4 MK_ARC................................................9
  83.              3.5 UN_ARC................................................9
  84.              3.6 SEE_ARC...............................................9
  85.          4.0 Reader & Writer Functions................................10
  86.          5.0 Library Functions........................................11
  87.              5.1 InitLZW..............................................11
  88.              5.2 TermLZW..............................................11
  89.              5.3 Compress.............................................12
  90.              5.4 Expand...............................................12
  91.          6.0 Error Codes..............................................13
  92.              6.1 EXPANSION_ERROR......................................13
  93.              6.2 CANNOT_ALLOCATE......................................13
  94.              6.3 INTERNAL_ERROR.......................................13
  95.              6.4 NOT_READY............................................13
  96.          7.0 Legal Issues.............................................14
  97.              7.1 Registration.........................................14
  98.              7.2 License..............................................15
  99.              7.3 Warranty.............................................15
  100.          8.0 Revision History.........................................16
  101.          9.0 Other MarshallSoft Computing Products for Pascal.........16
  102.              9.1 The Personal Communications Library for Pascal.......16
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.         LZW4P Users Manual                                     Page 2
  121.          1.0 Introduction
  122.  
  123.  
  124.          LZW4P  consists  of a variable code size implementation of the LZW
  125.          (Lempel-Ziv-Welch) algorithm  for  compressing  and  decompressing
  126.          data.   LZW does particularly well on text files, achieving better
  127.          than a 50 % compression ratio for many files.
  128.  
  129.          The  LZW  algorithm  is  considered  to be one of the best general
  130.          purpose algorithms available today.  The  new  high  speed  modems
  131.          that  employ  on-the-fly  data  compression (such as MNP 5.0 & the
  132.          V.42 bis international standard) use the LZW  algorithm,  as  well
  133.          as such well known utility programs such as PKZIP.
  134.  
  135.          The  LZW4P  library  is  designed  to be used in a wide variety of
  136.          situations. Some of the possible uses include:
  137.  
  138.          1) Compression and expanding files on disk.
  139.          2) Compressing files "on the fly" before  sending  over  a  modem,
  140.             and then expanding on the receiving end.
  141.          3) Compression of data files used by your application program such
  142.             as help files, graphics screens, etc. The compressed data files
  143.             are then expanded as they are loaded by the application.
  144.  
  145.  
  146.          1.1 Distribution Files
  147.  
  148.          The distribution files are as follows:
  149.  
  150.  
  151.           1) LZW4P.DOC    -- This documentation file.
  152.           2) LZW4P.INV    -- Invoice file.
  153.           3) COMPRESS.PAS -- Data compression example program.
  154.           4) EXPAND.PAS   -- Data expansion example program.
  155.           5) LZW4P.PAS    -- Library unit interface.
  156.           6) TEST_LZW.PAS -- LZW test driver program.
  157.           7) MK_ARC.PAS   -- File archiving program.
  158.           8) UN_ARC.PAS   -- File un-archiving program.
  159.           9) RW_IO.PAS    -- Reader/Writer I/O source file.
  160.          10) DIR_IO.PAS   -- Directory I/O source file.
  161.          11) LZW_ERR.PAS  -- Displays text error messages.
  162.          12) MEMORY.PAS   -- Memory allocation functions.
  163.          13) HEX_IO.PAS   -- Procedure to read & write hexidecimal.
  164.          14) LZW4PLIB.OBJ -- Library object file.
  165.  
  166.          Registered users also receive:
  167.  
  168.           1) LZW4PLIB.ASM -- Library source file.
  169.           2) MAKETPU.BAT  -- Makes library object from source.
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.         LZW4P Users Manual                                     Page 3
  181.          1.2 Compiling the Library
  182.  
  183.  
  184.          If you are not running Turbo Pascal 6.0, you may need to recompile
  185.          the library unit as follows:
  186.  
  187.                TPC LZW4P
  188.  
  189.          The registered user can recompile the source code (source code  is
  190.          provided  in  the  registered  version  only)  for  the library as
  191.          follows:
  192.  
  193.                MAKETPU
  194.  
  195.          or
  196.  
  197.                MASM LZW4PLIB.ASM,LZW4PLIB.OBJ /DPASCAL_MODEL;
  198.                TPC LZW4P
  199.  
  200.  
  201.          1.3 User Support
  202.  
  203.          We  want you to be successful in developing your application using
  204.          our libraries! We depend on our customers to let us know what they
  205.          need in a library.  This means we are committed to  providing  the
  206.          best  libraries  that  we  can.   If  you  have any suggestions or
  207.          comments, please write to us or give us a call.
  208.  
  209.          If you are having a problem using LZW4P or any of  our  libraries,
  210.          call  (205)  881-4630  between  5  PM  and 9 PM CST Monday through
  211.          Friday.  You can call at other times and leave a message, and call
  212.          back later during our regular business hours for a reply. You  can
  213.          also FAX us at this same number at any time.
  214.  
  215.          You  may  also  call  our  24  hour  BBS at any time. The BBS will
  216.          contain the latest shareware version of LZW4P, messages, and other
  217.          related files. All files are in  standard  ZIP  format.   You  can
  218.          leave a message on the BBS, and we will usually have a reply ready
  219.          for  you  within  24  hours.   The  dedicated  telephone number is
  220.          205-880-9748.  Set your modem for 1200 to 9600 baud, 8 data  bits,
  221.          no parity, one stop bit.
  222.  
  223.          The  MarshallSoft  Computing,  Inc.   newsletter  "Comm  Talk"  is
  224.          published quarterly.  It discusses various communications problems
  225.          and solutions using PCL (the communications library)  as  well  as
  226.          related  information  such as data compression issues.  Registered
  227.          users receive a one year  comp